package kr.co.shoppingmall.reviewboard;

import java.util.HashMap;
import java.util.List;

public class ReviewBoardServiceImpl implements ReviewBoardService {
	//ReviewBoardService는 ReviewBoardDAO에 의존함
	private ReviewBoardDAO reviewboardDAO;
	//Setter Injection으로 의존성을 주입시켜 준다.
	public void setReviewboardDAO(ReviewBoardDAO reviewboardDAO) {
		this.reviewboardDAO = reviewboardDAO;
	}
	
	@Override
	public void insertReviewBoard(ReviewBoardDTO dto) {
		reviewboardDAO.insertReviewBoard(dto);		
	}

	@Override
	public List getReviewBoardList(HashMap map) {
		return reviewboardDAO.getReviewBoardList(map);
	}

	@Override
	public int getReviewCount() {
		return reviewboardDAO.getReviewCount();
	}

	@Override
	public ReviewBoardDTO getReviewBoard(int rboard_num) {
		return reviewboardDAO.getReviewBoard(rboard_num);
	}

	@Override
	public void updateReviewBoardHit(int rboard_num) {
		reviewboardDAO.updateReviewBoardHit(rboard_num);
	}

	@Override
	public void updateReviewBoard(ReviewBoardDTO dto) {
		reviewboardDAO.updateReviewBoard(dto);
	}

	@Override
	public void deleteReviewBoard(ReviewBoardDTO dto) {
		reviewboardDAO.deleteReviewBoard(dto);
	}

	@Override
	public void updateReviewReply(ReviewBoardDTO dto) {
		reviewboardDAO.updateReviewReply(dto);
	}

	@Override
	public void insertReviewReply(ReviewBoardDTO dto) {
		reviewboardDAO.insertReviewReply(dto);
	}
	
	
}
